<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%
	ArrayList<String> jsPaths = new ArrayList<String>();
	jsPaths.add("/resources/bootstrap/assets/js/jquery.js");
	jsPaths.add("/resources/bootstrap/dist/js/bootstrap.min.js");
	jsPaths.add("/resources/bootstrap/validation/jquery.validate.min.js");
	jsPaths.add("/resources/custom/home/home.js");
	request.setAttribute("jsPaths", jsPaths);
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="热计量改造监测系统">
<meta name="author" content="leo wang">
<title>热计量改造监测系统</title>
<link
	href="${pageContext.request.contextPath}/resources/bootstrap/dist/css/bootstrap.min-flatty1.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/resources/custom/home/home.css"
	rel="stylesheet">
<jsp:include page="header/${nav}.jsp"></jsp:include>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="${pageContext.request.contextPath}/resources/bootstrap/assets/js/respond.min.js"></script>
      <script src="${pageContext.request.contextPath}/resources/bootstrap/assets/js/html5shiv.js"></script>
    <![endif]-->
</head>

<body style="z-index: 0;">
	<script type="text/javascript">
		var nav = "${nav}";
		var errorMsg = "${error}";
		var basePath = "${pageContext.request.contextPath}/";
		var today = new Date(); //新建一个Date对象 
		var date = today.getDate();//查询当月日期 
		var month = today.getMonth();//查询月份 
		var year = today.getFullYear();//查询年份
	</script>
	<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target=".navbar-collapse">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<div class="milky" href="#">热计量改造监测系统</div>
			</div>
			<div class="navbar-collapse collapse">
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#">你好&nbsp;<sec:authentication
								property="principal.username" /></a></li>
					<li><a
						href="${pageContext.request.contextPath}/j_spring_security_logout">注销</a></li>
				</ul>

			</div>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<sec:authorize
						access="hasRole('SP') or hasRole('ADMIN') or hasRole('PM')">
						<li><a
							href="${pageContext.request.contextPath}/home/dashBoard">数据总揽</a></li>
					</sec:authorize>
					<sec:authorize access="hasRole('ADMIN') ">
						<li><a href="${pageContext.request.contextPath}/home/project">项目管理</a></li>
					</sec:authorize>
					<sec:authorize access="hasRole('ADMIN')  or hasRole('PM')">
						<li><a href="${pageContext.request.contextPath}/home/target">用户管理</a></li>
						<li><a href="${pageContext.request.contextPath}/home/device">设备管理</a></li>
						<li><a href="${pageContext.request.contextPath}/home/meter">总表管理</a></li>

					</sec:authorize>
					<sec:authorize
						access="hasRole('ADMIN')  or hasRole('PM')  or hasRole('SP')">

						<li><a
							href="${pageContext.request.contextPath}/home/readMeter">总表数据</a></li>

						<li class="dropdown-submenu"><a class="dropdown-toggle"
							data-toggle="dropdown" href="#">数据监控</a>
							<ul class="dropdown-menu pull-right" role="menu"
								aria-labelledby="dLabel">
								<li><a
									href="${pageContext.request.contextPath}/home/dataMonitor">通断面积法</a></li>
								<li><a
									href="${pageContext.request.contextPath}/home/dataHeatMonitor">热能表计量法</a></li>

							</ul></li>
						<li class="dropdown-submenu"><a class="dropdown-toggle"
							data-toggle="dropdown" href="#">历史数据</a>
							<ul class="dropdown-menu pull-right" role="menu"
								aria-labelledby="dLabel">
								<li><a
									href="${pageContext.request.contextPath}/home/dataList">通断面积法</a></li>
								<li><a
									href="${pageContext.request.contextPath}/home/dataHeatList">热能表计量法</a></li>

							</ul></li>
						<li><a
							href="${pageContext.request.contextPath}/home/areaAnalysis">区域统计</a></li>
						<li><a
							href="${pageContext.request.contextPath}/home/trendsAnalysis">趋势分析</a></li>
						<li><a
							href="${pageContext.request.contextPath}/home/mypassword">修改密码</a></li>
					</sec:authorize>
					<sec:authorize access="hasRole('ADMIN') ">
						<li><a href="${pageContext.request.contextPath}/home/user">登录管理</a></li>
					</sec:authorize>
				</ul>
			</div>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<div id="alert-warning"
					class="alert alert-warning alert-dismissable hidden">
					<button type="button" class="close" data-dismiss="alert"
						aria-hidden="true">&times;</button>
				</div>
				<jsp:include page="${nav}.jsp"></jsp:include>
			</div>
		</div>
	</div>
	<jsp:include page="common/tail.jsp"></jsp:include>
</body>
</html>
